package com.woyowodaows.adapter.mine;

import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.woyowodaows.R;
import com.woyowodaows.bean.home.NoticeBean;
import com.woyowodaows.bean.home.OrderInfo;
import com.woyowodaows.bean.mine.NewBean;

/**
 * 消息中心
 */

public class NewCentreAdapter extends BaseQuickAdapter<NewBean, BaseViewHolder> {



    public NewCentreAdapter() {
        super(R.layout.item_new_centre);
    }

//
    @Override
    protected void convert(final BaseViewHolder helper, NewBean item) {



        TextView tv_news_tilte_conets = helper.getView(R.id.tv_news_tilte_conets);//订单信息
        tv_news_tilte_conets.setText(item.getTitle());

        TextView tv_news_times = helper.getView(R.id.tv_news_times);//订单时间
        tv_news_times.setText(item.getCreateTime());
        TextView tv_news_state = helper.getView(R.id.tv_news_state);//订单状态
        if(item.getType().equals("notice")){
             tv_news_state.setBackgroundResource(R.drawable.shape_bg_red_small);
             tv_news_state.setText("公告");
        }else {//提醒
            tv_news_state.setText("提醒");
            tv_news_state.setBackgroundResource(R.drawable.shape_button_green);
        }

    }


}
